package com.jeejam.product.sdk.api;

import com.jeejam.framework.base.pojo.Pager;
import com.jeejam.product.sdk.dto.ProductDto;

import java.util.List;
import java.util.Map;

public interface IProductService {

	public int counts();

	public Pager getPager(int currentPage, int pageSize);

	public List<ProductDto> findAllByPage(int currentPage, int pageSize);

	public List<ProductDto> findAll();

	public Pager getPagerByCounts(int counts,int currentPage, int pageSize);

	public void deleteById(int id);

	public ProductDto getById(int id);

	public void save(ProductDto productDto);

	public void update(ProductDto productDto);

	public int getTotalPage(int counts, int pageSize);

	public List<ProductDto> findByCategoryId(int rootCategoryId, int page, int pageSize);
	
	public int countsByCategoryId(int rootCategoryId);
	
	public List<ProductDto> findForNewByCategoryId(int rootCategoryId, int page, int pageSize);
	
	public int countsForNewByCategoryId(int rootCategoryId);
	
	public List<ProductDto> findForHotByCategoryId(int rootCategoryId, int page, int pageSize);
	
	public int countsForHotByCategoryId(int rootCategoryId);
	
	public List<ProductDto> findForRecommendByCategoryId(int rootCategoryId, int page, int pageSize);
	
	public int countsForRecommendByCategoryId(int rootCategoryId);
	
	public List<ProductDto> findByBrandId(int brandId, int page, int pageSize);
	
	public List<ProductDto> findByBrandName(String brandName, int page, int pageSize);
	
	public ProductDto getByCode(String productCode);
	
	public List<ProductDto> findForRecommend(int page, int pageSize);
	
	public List<ProductDto> findForNew(int page, int pageSize);
	
	public List<ProductDto> findForBest(int page, int pageSize);
	
	public List<ProductDto> findForHot(int page, int pageSize);
	
	public int countsForRecommend();
	
	public int countsForNew();
	
	public int countsForBest();
	
	public int countsForHot();
	
	public int getVotes(int id);
	
	public void updateViews(int id);
	
	public void updateVotes(int votes, int id);
	
	public List<Map<String, Object>> createExcelRecord(List<ProductDto> productDtoList);

	public List<Map<String, Object>> show(int userId, List<ProductDto> productDtoList);

	public ProductDto findById(int id);
}
